//
//  HMLrcCell.m
//  04-黑马音乐
//
//  Created by apple on 15-3-29.
//  Copyright (c) 2015年 itcast. All rights reserved.
//

#import "HMLrcCell.h"
#import "HMLrcLine.h"
@implementation HMLrcCell

+ (instancetype)lrcCellWithTableView:(UITableView *)tableView
{
    NSString *ID = @"lrcCell";
    HMLrcCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    
    if (cell == nil) {
        cell = [[HMLrcCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];
         // 1.去除cell的背景
        cell.backgroundColor = [UIColor clearColor];
        cell.textLabel.textColor = [UIColor whiteColor];
        cell.textLabel.textAlignment = NSTextAlignmentCenter;
    }
    
    return cell;
}

- (void)setLrcLine:(HMLrcLine *)lrcLine {
     self.textLabel.text = lrcLine.text;
}

- (void)layoutSubviews
{
    [super layoutSubviews];    
    self.textLabel.frame = self.bounds;
}

@end
